package com.manage.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.manage.entity.Pickup;
import com.manage.entity.vo.PieEchartsRes;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface PickupMapper extends BaseMapper<Pickup> {

    @Select("SELECT book.book_name as name,sum(count) as value from pickup LEFT JOIN book on pickup.book_id = book.id GROUP BY book_id")
    List<PieEchartsRes> countForEcharts();
}
